package com.hejing.final关键字的使用;

/**
 * ClassName: A
 * Package: com.hejing.final关键字的使用
 * Description:
 *
 * @Author: HeJing
 * @Create: 2023-03-29 9:37
 * @Version: 1.0
 */
public class A {
    // 成员变量:
    final int MIN_SSCORE = 0;
    final int MAX_SCORE;
    final int MID_SCORE;
    // 代码块中赋值
    {
        // MIN_SSCORE = 10;  // 已经显示赋值，再次赋值会报错
        MAX_SCORE = 10;
    }

    // 构造器中赋值
    public A() {
        // MIN_SSCORE = 100;
        // MAX_SCORE = 100;
        MID_SCORE = 100;
    }
}




























